
// C++风格不定参函数

#include <iostream>

using namespace std;

void my_print()
{
    cout << endl;
}

template <class T, class ...Args>
void my_print(const T& x, Args&& ...args)
{
    cout << x << " ";
    if(sizeof...(args) > 0)
        my_print(args...);
    else
        my_print();
}

int main()
{
    my_print("hello");
    my_print("hello", "world");
    my_print("hello", "world", 123);

    return 0;
}